package com.nbsaas.boot.shopArticle.rest.convert;

import com.nbsaas.boot.shopArticle.data.entity.ShopArticleDocument;
import com.nbsaas.boot.shopArticle.api.domain.request.ShopArticleDocumentRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 请求对象转换成实体对象
*/

public class ShopArticleDocumentEntityConvert  implements Converter<ShopArticleDocument, ShopArticleDocumentRequest> {

    @Override
    public ShopArticleDocument convert(ShopArticleDocumentRequest source) {
        ShopArticleDocument result = new ShopArticleDocument();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

